//
//  RechargeViewController.m
//  penzer
//
//  Created by caiyc on 2018/9/21.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "RechargeViewController.h"
#import "WXApi.h"
@interface RechargeViewController ()<UIScrollViewDelegate>

@end

@implementation RechargeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavigation:1 andTitle:@"充值中心" andNaviColor:nil andTitleColor:nil];
    self.botom_ScroView.contentSize = CGSizeMake(screen_width, screen_height*1.2);
    self.botom_ScroView.delegate = self;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hideKb)];
    [self.view addGestureRecognizer:tap];
    // Do any additional setup after loading the view from its nib.
}
-(void)hideKb{
    [self.view endEditing:1];
}
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
    [self.view endEditing:1];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)next:(id)sender {
   // [WToast showWithText:@"等待商家接入账号"];
//    NSDictionary *param = @{@"i":@"10",@"m":@"bz_activities",@"c":@"entry",@""@"id":self.order_id,@"op":@"pay",@"ac":@"system",@"ctrl":@"live",@"token":[XTool GetDefaultInfo:USER_INFO][@"token"],@"pay_type":@"act_live"};
//    AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
//    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html", nil];
//    
//    NSLog(@"请求参数%@",param);
//    [manager POST:BASE_URL parameters:param success:^(AFHTTPRequestOperation * _Nonnull operation, id  _Nonnull responseObject) {
//        NSLog(@"请求结果：%@",responseObject);
//        if([responseObject[@"message"][@"errno"]integerValue]==0){
//            PayReq* req             = [[PayReq alloc] init];
//            // req.
//            req.partnerId           = @"1515323121";
//            
//            req.prepayId            = responseObject[@"message"][@"message"][@"prepayid"];
//            //  req.nonceStr            = [self createnonceStr];
//            req.nonceStr            = responseObject[@"message"][@"message"][@"noncestr"];
//            req.timeStamp = [responseObject[@"message"][@"message"][@"timestamp"]intValue];
//            req.package             = @"Sign=WXPay";
//            req.sign                = responseObject[@"message"][@"message"][@"sign"];
//            [WXApi sendReq:req];
//        }else{
//            [WToast showWithText:@"请求出错"];
//        }
//        
//        
//        
//        
//    } failure:^(AFHTTPRequestOperation * _Nullable operation, NSError * _Nonnull error) {
//        NSLog(@"请求出错===……%@",error);
//    }];
}
- (IBAction)enterLive:(UIButton *)sender {
}
@end
